// bts_DibExApi.hpp: interface for the bts_DibExApi class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BTS_DIBEXAPI_HPP__CBE68B43_0AEE_475A_B48B_0DAE68E8DA08__INCLUDED_)
#define AFX_BTS_DIBEXAPI_HPP__CBE68B43_0AEE_475A_B48B_0DAE68E8DA08__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "..\btsdib\Bts_DibApi.hpp"

// Image position in Canvas
#define LEFT_UP				1
#define CENTER_UP			2
#define RIGHT_UP			3
#define LEFT_CENTER			4
#define CENTER_CENTER		5
#define CENTER_RIGHT        6
#define LEFT_DOWN			7
#define CENTER_DOWN			8
#define RIGHT_DOWN			9

/* Gray Method */
#define MEAN_GRAY			0
#define MAXIMUM_GRAY		1
#define WEIGHT_GRAY			2

/* Color Model */
#define RGB_COLOR			0
#define CMYK_COLOR			1
#define HSI_COLOR			2
#define HLS_COLOR			3
#define UNDEFINED			(-1.0)

// Separate color
#define SEPARATE_RED		1
#define SEPARATE_GREEN		2
#define SEPARATE_BLUE		3

// Filte color
#define FILTE_RED			1
#define FILTE_GREEN			2
#define FILTE_BLUE			3

// Filter algorithm
#define FILTER1				1
#define FILTER2				2
#define FILTER3				3

// Edge enhancement algorithm
#define VERT				1
#define HORZ				2
#define VERTHORZ			3
#define NORTH				4
#define NORTHEAST			5
#define EAST				6
#define SOUTH				7
#define SOUTHEAST			8
#define SOUTHWEST			9
#define WEST				10
#define NORTHWEST			11
#define LAP1				12
#define LAP2				13
#define LAP3				14
#define LAP4				15
#define SOBEL				16
#define HOUGH				17

namespace bts
//////////////////////////////////////////////////////////////////////////
{

/* function prototypes */ 
	// effect display
AFX_EXT_API void DrawTransparentBitmap(HDC, HBITMAP, LONG, LONG, COLORREF);
AFX_EXT_API BOOL Fade(int nDeltaR, int nDeltaG, int nDeltaB, 
		  BYTE rm, BYTE gm, BYTE bm,
		  BYTE *r, BYTE *g, BYTE *b);
	// DIB transform
AFX_EXT_API HBITMAP	CropBitmap(HBITMAP, LPRECT);
AFX_EXT_API HDIB CropDIB(HDIB, LPRECT);
AFX_EXT_API HDIB CutDIB(HDIB, LPRECT);
AFX_EXT_API HDIB MergeDIB(HDIB hDib1, HDIB hDib2, POINT ptTopLeft);
AFX_EXT_API HDIB TransparentMergeDIB(HDIB hDIB1, HDIB hDIB2, POINT ptTopLeft, COLORREF crTransparent);
AFX_EXT_API HBITMAP RotateBitmapNT(HBITMAP hBitmap, double fDegrees, COLORREF clrBack);
AFX_EXT_API HBITMAP RotateBitmap(HBITMAP hBitmap, double fDegrees, COLORREF clrBack);
AFX_EXT_API HDIB RotateDIB(HDIB hDIB, double fDegrees, COLORREF clrBack);
AFX_EXT_API HDIB RotateDIB(HDIB hDib);
AFX_EXT_API HDIB FlipHorzDIB(HDIB hDib);
AFX_EXT_API HDIB FlipVertDIB(HDIB hDib);
AFX_EXT_API HDIB ChangeDIBSize(HDIB hDIB, int nWidth, int nHeight);
AFX_EXT_API HDIB ChangeDIBCanvasSize(HDIB hDIB, int nWidth, int nHeight, int nPosition);
	// image process (IP.cpp)
AFX_EXT_API BOOL HighPassDIB(HDIB hDib, int Strength, int nAlgorithm);
AFX_EXT_API BOOL LowPassDIB(HDIB hDib, int Strength, int nAlgorithm);
AFX_EXT_API BOOL EdgeEnhanceDIB(HDIB hDib, int Strength, int nDirection);
AFX_EXT_API BOOL MedianFilterDIB(HDIB hDib);
AFX_EXT_API BOOL ErosionDIB(HDIB hDib, BOOL bHori);
AFX_EXT_API BOOL DilationDIB(HDIB hDib, BOOL bHori);
AFX_EXT_API BOOL MorphOpenDIB(HDIB hDib, BOOL bHori);
AFX_EXT_API BOOL MorphCloseDIB(HDIB hDib, BOOL bHori);
AFX_EXT_API BOOL ContourDIB(HDIB hDib, BOOL bHori);
AFX_EXT_API BOOL ThinningDIB(HDIB hDib);
AFX_EXT_API BOOL FFTDIB(HDIB hDIB);
AFX_EXT_API BOOL DCTDIB(HDIB hDIB);
AFX_EXT_API BOOL WALhDIB(HDIB hDIB);
//
AFX_EXT_API BOOL EmbossmentDIB(HDIB hDIB, int nBackground);
AFX_EXT_API BOOL SpreadDIB(HDIB hDIB, int nBlockSize);
AFX_EXT_API BOOL EdgeDetectDIB(HDIB hDib, int nAlgorithm);
AFX_EXT_API BOOL HomogenityEdegeDetectDIB(HDIB hDib);
AFX_EXT_API BOOL DifferenceEdegeDetectDIB(HDIB hDib);
AFX_EXT_API BOOL CannyEdegeDetectDIB(HDIB hDib);

//////////////////////////////////////////////////////////////////////////
}	//

#endif // !defined(AFX_BTS_DIBEXAPI_HPP__CBE68B43_0AEE_475A_B48B_0DAE68E8DA08__INCLUDED_)
